
export const searchFormConfig = (vm) => {
	return {
		labelWidth: '100px',
		props: [
			{
				width: '200px',
				type: 'select',
				prop: 'approvalStatus',
				placeholder: '审核状态',
				options: [
					{value:1,label:'发送'},
					{value:2,label:'发送中'},
					{value:3,label:'发送完成'},
				]
			},
			{
				width: '200px',
				type: 'select',
				prop: 'relatedAppId',
				placeholder: '所属应用',
				options: [
					{value:1,label:'发送'},
					{value:2,label:'发送中'},
					{value:3,label:'发送完成'},
				]
			},
			{
				width: '200px',
				type: 'select',
				prop: 'deliveryChannel',
				placeholder: '发送渠道',
				// label: '发送状态',
				options: [
					{value:1,label:'发送'},
					{value:2,label:'发送中'},
					{value:3,label:'发送完成'},
				]
			},
			{
				width: '200px',
				type: 'input',
				prop: 'msgKey',
				placeholder: '输入消息关键字查询',
				// label: 'ID查询'
			},

		]
	}
}
export const tableColumnsConfig = (vm) => {
	return [
		{
			type: 'selection',
		},
		{
			prop: 'id',
			label: 'ID',
			width: 80,
		},
		{
			prop: 'manager',
			label: '类型',
			render: (h, row, index, column) => {
				let str = row.type == 1 ? '系统新增' : '三方推送';
				return h('span', {}, str || '-');
			},
		},
		{
			prop: 'userName',
			label: '姓名',
		},
		{
			prop: 'phoneNumber',
			label: '手机号',
			width: 150,
		},
		{
			prop: 'openId',
			label: '微信OPENID',
			width: 220,
		},
		{
			prop: 'registrationId',
			label: '极光唯一标识',
			width: 220,
		},
		{
			prop: 'deviceId',
			label: '阿里唯一标识',
			width: 220,
		},
		{
			prop: 'updateTime',
			label: '更新时间',
			width: 170,
		},
		{
			prop: 'operate',
			label: '操作',
			width: 200,
			fixed: 'right',
			operation: [
				{
					label: '编辑',
					showIf: (row) => {
						return true;
					},
					click: (row) => {
						vm.handleEdit(row);
					},
				},
				{
					label: '标签',
					showIf: (row) => {
						return true;
					},
					click: (row) => {
						vm.handleSetLabel(row);
					},
				},
				{
					label: '删除',
					showIf: (row) => {
						return true;
					},
					click: (row) => {
						vm.handleDelete(row);
					},
				},
			],
		},
	];
};

